﻿using System;

//订单详细信息，包括订单号，商品名称等
namespace Homework8_Order
{
    [Serializable]
    public class OrderItem
    {
        public string GoodsName { get; set; }//商品名称
        public int Price { get; set; }//单价
        public int Amount { get; set; }//购买数量
        public int TotalPrice { get; set; }//总价
        public string Time { get; set; }//交易时间
        public OrderItem()
        {

        }

        public OrderItem(int price, int amount, string Gname)
        {
            Time = DateTime.Now.ToString("yyyy-MM-dd");
            Price = price;
            Amount = amount;
            TotalPrice = price * amount;
            GoodsName = Gname;
        }
    }
}
